Skip to content

feat: add agent set status to BoltAgent#1441

Merged
srtaalej merged 4 commits intomainfrom
feat-agent-set-status
Feb 17, 2026
Merged

feat: add agent set status to BoltAgent#1441
srtaalej merged 4 commits intomainfrom
feat-agent-set-status

Conversation

@srtaalej
Copy link
Contributor

Summary

Add set_status() to BoltAgent and AsyncBoltAgent for setting assistant thread status directly from the agent listener argument

Testing

  from slack_bolt import App, BoltAgent

  app = App(token=os.environ["SLACK_BOT_TOKEN"])

  @app.event("app_mention")
  def handle_mention(agent: BoltAgent):
      agent.set_status(status="Thinking...")
      # ... do work ...
      stream = agent.chat_stream()
      stream.append(markdown_text="Hello!")
      stream.stop()

Category

  • slack_bolt.App and/or its core components
  • slack_bolt.Agent and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run ./scripts/install_all_and_run_tests.sh after making the changes.

@srtaalej srtaalej self-assigned this Feb 16, 2026
@srtaalej srtaalej added enhancement New feature or request semver:minor experiment Experimental feature documented with ExperimentalWarning and pydoc Experiment section labels Feb 16, 2026
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.64%. Comparing base (1ad642e) to head (d9937dc).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1441   +/-   ##
=======================================
  Coverage   90.64%   90.64%           
=======================================
  Files         226      226           
  Lines        7182     7187    +5     
=======================================
+ Hits         6510     6515    +5     
  Misses        672      672           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srtaalej LGTM! A few changes needed for async typecheckings but this is awesome to find 🤖 ✨

@zimeg
Copy link
Member

zimeg commented Feb 16, 2026

@srtaalej I also changed the semver tag to be patch! For "experiments" we're planning to release these all under patch versions to avoid signaling more meaningful or stable updates 🐭

@srtaalej srtaalej marked this pull request as ready for review February 17, 2026 16:29
@srtaalej srtaalej requested a review from a team as a code owner February 17, 2026 16:29
srtaalej and others added 3 commits February 17, 2026 11:29
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
@srtaalej
Copy link
Contributor Author

tyty @zimeg for speedy reviews and semver updates 🌠 excited to get this one merged 😁

Copy link
Member

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Great work @srtaalej!

🧪 I haven't manually tested this. Just want to check that one of you have already done it before we merge?

✏️ I left a minor suggestion, I think it's worth a discussion, but we can do it in a 2nd PR!

channel_id=channel or self._channel_id, # type: ignore[arg-type]
thread_ts=thread_ts or self._thread_ts, # type: ignore[arg-type]
status=status,
loading_messages=loading_messages,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion(non-blocking): This can be a follow-up PR (probably better if it is). I think it would be really nice if Bolt provided sensible defaults.

  • status: "Thinking..." when no status is provided
  • loading_messages:: a list of 5 fun, witty loading messages that are used when no loading messages are provided

This function is called a lot. So, it'll be nice if developers can start with agent.set_status() and have a solid experience out of the box. Then customize it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i like this idea ⭐ working on it 🫡

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh and yes i tested using the bolt-python-assistant-template 🚀

@srtaalej srtaalej merged commit cd52d19 into main Feb 17, 2026
15 checks passed
@srtaalej srtaalej deleted the feat-agent-set-status branch February 17, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request experiment Experimental feature documented with ExperimentalWarning and pydoc Experiment section semver:patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants